package com.itheima.service.impl;

import com.itheima.domain.NewTrip;
import com.itheima.domain.Trip;
import com.itheima.mapper.NewTripMapper;
import com.itheima.service.NewTripService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewTripServiceImpl implements NewTripService {
    @Autowired
    private NewTripMapper newTripMapper;

    //使用蠕虫复制数据
    public void insert() {
        newTripMapper.insert();
    }
    //查询所有数据
    public List<Trip> queryAll() {
        List<Trip> list = newTripMapper.queryAll();
        return list;
    }

}
